package com.qf.controller;

import com.qf.dao.UserDao;
import com.qf.pojo.User;
import com.qf.service.UserService;
import com.qf.service.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController

@RequestMapping("/add")
public class UserController {
    @Autowired
//    private UserService userService;
    private UserService userService;
    @GetMapping  ("/insert")
    public Object add(@RequestBody  User user){

       return userService.addUser(user);


//        return user


    }




//
//    @Autowired
//    private UserService userService;
//@RequestMapping(value = "/add")
//    public int addUser(User user){
////        System.out.println(user);
//    return userService.addUser(user);
//    }
}
